<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>抄表读数</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="./css/headersearch.css" />
    <link rel="stylesheet" type="text/css" href="css/headersearch.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/analysis_historyfeesummary.css" />
    <link rel="stylesheet" type="text/css" href="css/customerservicelist.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="css/analysis_equipment_frm.css" />
    <style>
        .work_title {
            border-left: 0;
            padding-left: 0;
            font-size: 0.75rem;
            margin-bottom: 15px;
            margin-top: 10px;
            display: unset;
        }

        .work_title span i {
            vertical-align: text-top;
        }

        .work_con_box_time {
            justify-content: space-between;
        }

        .new-edit-input {
            border: solid 1px #ccc;
            border-radius: 6px;
            padding: 0 15px;
            margin-top: 10px;
            margin-bottom: 15px;
            font-weight: bold;
        }

        .new-edit-input .van-cell {
            padding: 0;
            height: 1.8rem;
        }

        .new-edit-input .van-field__control {
            height: 1.8rem;
            font-size: 18px;
        }

        .new-icon-flex {
            position: absolute;
            top: 0px;
            right: 0px;
            display: flex;
            align-items: center;
            height: 20px;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div v-on:click="doHideSearch()" v-if="showsearch" class="maskbg">
        </div>
        <div v-if="showsearchparam" class="searchparam nomenu" style="height: 50%;z-index: 100;">
            <div class="searchcontent" style="height: 100%;">
                <div class="searchparamtitle">
                    仪表类型名称
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSelectMeterType(item.ID,item.Name)"
                        v-bind:class="{'active':form.MeterTypeIDs.indexOf(item.ID)>-1}"
                        v-for="item in MeterTypeList">{{item.Name}}</label>
                </div>
            </div>
        </div>
        <!-- 顶部筛选 -->
        <div v-if="IsEdit!=true" class="aui-content headerBox bgshadow" style="height:auto;padding-bottom: 5px;">
            <div class="search_box" v-bind:class="{'fixedbox':showsearch}">
                <div id="datemonth" data-options='{"type":"month"}' class="searchitem aui-padded-l-5"
                    v-bind:class="{'chkedbox':showsearchmonth}">
                    抄表日期：{{form.startMonth}}
                </div>
                <div class="searchitem" v-bind:class="{'chkedbox':showsearchparam}" v-on:click="doSelectSearchParam(1)">
                    筛选
                    <i v-if="!showsearchparam" class="icon iconfont icon-down"></i>
                    <i v-if="showsearchparam" class="icon iconfont icon-shangjiantou" style="color:#fff;"></i>
                </div>
                <!-- <div id="datemonth" data-options='{"type":"month"}' class="searchitem"
                    v-bind:class="{'chkedbox':showsearchmonth}" v-on:click="doSelectSearchParam(2)">
                    {{form.activeDateDesc}}
                    <i v-if="!showsearchmonth" class="icon iconfont icon-down"></i>
                    <i v-if="showsearchmonth" class="icon iconfont icon-shangjiantou" style="color:#fff;"></i>
                </div> -->
            </div>
            <div class="aui-searchbar" id="search">
                <div class="aui-searchbar-input aui-searchbar-input-white  aui-border-radius">
                    <i class="icon iconfont icon-sousuo"></i>
                    <input v-model="form.keywords" type="search" placeholder="资源编号、仪表编号、仪表名称" id="search-input">
                    <div class="aui-searchbar-clear-btn">
                        <i class="icon iconfont icon-guanbi"></i>
                    </div>
                </div>
                <div class="aui-searchbar-btn" tapmode></div>
            </div>
        </div>
        <div v-if="IsEdit!=true" class="aui-content" style="margin-top: 5.2rem">
            <section id="main_refresh" class="aui-refresh-content aui-margin-t-0">
                <div class="aui-content aui_listbox aui-margin-t-0 aui-padded-t-0">
                    <div class="aui_list boxarea mb20" v-for="(item,index) in list">
                        <div class="work_title">
                            <span>
                                <i v-if="item.MeterCategoryID==1"
                                    class="icon iconfont icon-shuibiao aui-font-size-18 aui-margin-r-5"
                                    style="color: #289FFF;"></i>
                                <i v-if="item.MeterCategoryID==2"
                                    class="icon iconfont icon-dianbiao aui-font-size-18 aui-margin-r-5"
                                    style="color: coral;"></i>
                                <i v-if="item.MeterCategoryID==3"
                                    class="icon iconfont icon-qibiao aui-font-size-18 aui-margin-r-5"
                                    style="color: red;"></i>
                            </span>
                            {{item.MeterName}}<span v-if="item.MeterName&&item.MeterNumber"> | </span>{{item.MeterNumber}} ({{item.MeterCoefficient}}倍)
                            <span v-if="list.length>1" v-on:click="onChooseMeterDel(item)" class="typestatus text-right"
                                style="margin-top: -6px;"><i class="icon iconfont icon-yxjianh text-grey"></i></span>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">资源位置</div>
                            <div class="work_con_box_right text-right">
                                <label>{{item.Name}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_name marginheight">
                            <div class="work_con_box_left">最近抄表日期</div>
                            <div class="work_con_box_right text-right">
                                <label>{{item.LastWriteDate?item.LastWriteDate:'--'}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_name marginheight">
                            <div class="work_con_box_left">最近抄表人</div>
                            <div class="work_con_box_right text-right">
                                <label>{{item.LastUserName?item.LastUserName:'--'}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">上次抄表读数</div>
                            <div class="work_con_box_right" style="position: relative;">
                                <label>{{item.MeterStartPoint}}</label>
                                <span class="new-icon-flex">
                                    <!-- 警告标识：暂定，后期做实际用量安全阈值判断 -->
                                    <!-- <i v-if="false"  class="icon iconfont icon-gantanhao aui-margin-r-5" style="color: red;"></i> -->
                                    实际用量：<span class="text-blue"
                                        style="font-weight: bold;">{{item.MeterFinalPoint}}</span>
                                    </spqn>
                            </div>
                        </div>
                        <div class="new-edit-input">
                            <van-field v-model="item.MeterEndPoint" type="number" @input="onkeyupreadnumber(item)"
                                placeholder="请录入当前读数" />
                        </div>
                    </div>
                    <!-- <div v-if="list.length>0" class="notodayList" style="background:none;">
                        没有更多内容
                    </div> -->
                </div>
                <div class="noinfo" id="noorder" v-if="list.length<=0">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无相关数据</h5>
                </div>
            </section>
        </div>

        <div v-if="IsEdit==true" class="aui-content" style="margin-top:10px">
            <section id="main_refresh" class="aui-refresh-content aui-margin-t-0">
                <div class="aui-content aui_listbox aui-margin-t-0 aui-padded-t-0">
                    <div class="aui_list boxarea mb20" v-for="(item,index) in list">
                        <div class="work_title">
                            <span>
                                <i v-if="item.MeterCategoryID==1"
                                    class="icon iconfont icon-shuibiao aui-font-size-18 aui-margin-r-5"
                                    style="color: #289FFF;"></i>
                                <i v-if="item.MeterCategoryID==2"
                                    class="icon iconfont icon-dianbiao aui-font-size-18 aui-margin-r-5"
                                    style="color: coral;"></i>
                                <i v-if="item.MeterCategoryID==3"
                                    class="icon iconfont icon-qibiao aui-font-size-18 aui-margin-r-5"
                                    style="color: red;"></i>
                            </span>
                            {{item.MeterName}}<span v-if="item.MeterName&&item.MeterNumber"> | </span>{{item.MeterNumber}} ({{item.MeterCoefficient}}倍)
                            <span v-if="list.length>1" v-on:click="onChooseMeterDel(item)" class="typestatus text-right"
                                style="margin-top: -6px;"><i class="icon iconfont icon-yxjianh text-grey"></i></span>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">资源位置</div>
                            <div class="work_con_box_right text-right">
                                <label>{{item.Name}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_name marginheight">
                            <div class="work_con_box_left">抄表日期</div>
                            <div class="work_con_box_right text-right">
                                <label>{{item.WriteDateDesc?item.WriteDateDesc:'--'}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_name marginheight">
                            <div class="work_con_box_left">抄表人</div>
                            <div class="work_con_box_right text-right">
                                <label>{{item.WriteUserName?item.WriteUserName:'--'}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">起始抄表读数</div>
                            <div class="work_con_box_right" style="position: relative;">
                                <label>{{item.MeterStartPoint}}</label>
                                <span class="new-icon-flex">
                                    <!-- 警告标识：暂定，后期做实际用量安全阈值判断 -->
                                    <!-- <i v-if="false"  class="icon iconfont icon-gantanhao aui-margin-r-5" style="color: red;"></i> -->
                                    实际用量：<span class="text-blue"
                                        style="font-weight: bold;">{{item.MeterFinalPoint}}</span>
                                    </spqn>
                            </div>
                        </div>
                        <div class="new-edit-input">
                            <van-field v-model="item.MeterEndPoint" type="number" @input="onkeyupreadnumber(item)"
                                placeholder="请录入当前读数" />
                        </div>
                    </div>
                    <!-- <div v-if="list.length>0" class="notodayList" style="background:none;">
                        没有更多内容
                    </div> -->
                </div>
                <div class="noinfo" id="noorder" v-if="list.length<=0">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无相关数据</h5>
                </div>
            </section>
        </div>
        <!--底部弹出年月选择-->
        <van-popup v-model:show="showsearchmonth" round position="bottom" :style="{ height: '40%' }">
            <van-datetime-picker v-model="currentDate" type="date" title="选择月份" :min-date="minDate" :max-date="maxDate"
                @cancel="doHideSearch" @confirm="onConfirm" />
        </van-popup>

        <div v-if="list.length>0" class="new_aui_bottom">
            <div class="aui_bottombtn" v-on:click="do_save()">保存读数</div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<!-- <script type="text/javascript" src="../script/aui-scroll.js"></script> -->
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/page/dateRangeUtil.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript" src="js/meterwriteread.js"></script>

</html>